package cn.islys.bean;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.List;
import java.util.Map;

//在AppConfig中添加@EnableConfigurationProperties注解可不用@Component
//@Component
@ConfigurationProperties(prefix ="cls")//配置属性
public class Cls {
    private String name;
    private List<String> list;
    private Test test;
    private Map<String,Cls2> map;


    public Cls(){

    }

    public Map<String, Cls2> getMap() {
        return map;
    }

    public void setMap(Map<String, Cls2> map) {
        this.map = map;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Test getTest() {
        return test;
    }

    public void setTest(Test test) {
        this.test = test;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "Cls{" +
                "name='" + name + '\'' +
                ", list=" + list +
                ", test=" + test +
                ", map=" + map +
                '}';
    }

    public String DogCry(String name){
        return name+"狗叫!!!";
    }
}
